package com.sanbi.shield.server.facade.enums;

import lombok.Getter;

/**
 * @desc 用户服务异常信息枚举
 * @author wanggang
 * @time 2024/9/18 11:16
 */
@Getter
public enum ShieldExceptionMsgEnum {
    LOGIN_FAILURE_EXCEPTION(ShieldExceptionTypeEnum.LOGIN_EXCEPTION,  50001,"username or password is wrong"),
    ;
    /**
     * 异常类型
     */
    private final ShieldExceptionTypeEnum type;
    /**
     * 消息编码
     */
    private final Integer code;
    /**
     * 提示语模板
     */
    private final String warnTemplate;

    /**
     * 构造器
     *
     * @param type         异常类型
     * @param code         消息编码
     * @param warnTemplate 提示语模板
     */
    ShieldExceptionMsgEnum(ShieldExceptionTypeEnum type, Integer code, String warnTemplate) {
        this.type = type;
        this.code = code;
        this.warnTemplate = warnTemplate;
    }
}
